home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
038a
/
bas_int1.zip
/
BRIGHTBG.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-06-24
|
3KB
|
113 lines
'======================================================================
' Quick Basic Forum
' Date : 20-Jun-91
' From : Monte Ferguson
'Subject : Bright **backgrounds**
'You can fiddle with the video modes to convert the blink bit into
'another bit of color attribute for the background. With EGA and VGA
'there is a BIOS call that will do this... with CGA you need to talk to
'the chips. Keep in mind that when you flip this bit you no longer have
'*blinking* characters. Blinking black on brown background will convert
'to non-blinking black on a yellow background.
'NOTE that you use a different method for EGA/VGA than you use for CGA...
'Note that this routine uses CALL INTERRUPT
'=========================================================================
DEFINT A-Z
TYPE RegType
AX AS INTEGER
BX AS INTEGER
CX AS INTEGER
DX AS INTEGER
BP AS INTEGER
SI AS INTEGER
DI AS INTEGER
FLAGS AS INTEGER
DS AS INTEGER
ES AS INTEGER
END TYPE
DIM SHARED Inregs AS RegType, Outregs AS RegType
DEF SEG = &H40 ' Set Segment to Video BIOS data
VidReg = 4 + PEEK(&H63) + PEEK(&H64) * 256 ' Get the video port to use
SCREEN 0, 0, 0
WIDTH 80, 25
CLS
FOR bg = 0 TO 7
FOR fg = 0 TO 31
LOCATE bg + 1, fg * 2 + 1
COLOR fg, bg
PRINT "**";
NEXT fg
NEXT bg
COLOR 7, 0
LOCATE 10, 1
PRINT STRING$(80, "═");
LOCATE 11, 1
PRINT "BLINKOID Blink Attribute Toggle Tester 21-Apr-90 Monte Ferguson"
PRINT " Note: Nothing above the line changes."
PRINT "Keys:"
PRINT "1 - Int 10.10.03 function BLINK BIT off (for EGA/VGA)"
PRINT "2 - Int 10.10.03 function BLINK BIT on (for EGA/VGA)"
PRINT "3 - CRT Mode Control Reg BLINK BIT off (for CGA)"
PRINT "4 - CRT Mode Control Reg BLINK BIT on (for CGA)"
PRINT "Esc - Quit"
LOCATE 18, 40
PRINT "I read the video control register as "; HEX$(VidReg)
DO
I$ = ""
DO WHILE I$ = ""
I$ = INKEY$
LOOP
SELECT CASE I$
CASE CHR$(27)
EXIT DO
CASE "1"
Inregs.AX = &H1003
Inregs.BX = 0
CALL interrupt(&H10, Inregs, Outregs)
CASE "2"
Inregs.AX = &H1003
Inregs.BX = 1
CALL interrupt(&H10, Inregs, Outregs)
CASE "3"
RegStat = PEEK(&H65)
LOCATE 20, 40
PRINT "Video Register was "; HEX$(RegStat);
RegStat = RegStat AND &HDF
OUT VidReg, RegStat
POKE &H65, RegStat
PRINT ", is now "; HEX$(RegStat); " "
CASE "4"
RegStat = PEEK(&H65)
LOCATE 20, 40
PRINT "Video Register was "; HEX$(RegStat);
RegStat = RegStat OR &H20
OUT VidReg, RegStat
POKE &H65, RegStat
PRINT ", is now "; HEX$(RegStat); " "
CASE "0"
VidReg = &H3D4
LOCATE 19, 40
PRINT "VidReg is now "; HEX$(VidReg)
CASE ELSE
END SELECT
LOOP
CLS
END